package com.hunt.service;

import com.hunt.model.dto.*;
import com.hunt.model.entity.AddressInfo;
import com.hunt.model.entity.SysUser;
import com.hunt.util.JSON;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: ww
 * @Date : 2019/11/1
 */
public interface ManagementService {

    long insertUser(SysUser user, String jobIds);

    boolean isExistLoginName(String loginName);

    void deleteById(long id);

    SysUser selectById(long id);

    boolean isExistLoginNameExcludeId(long id, String loginName);

    void updateUser(SysUser user, String jobIds);

    PageInfo selectPage(int page, int rows, String sort, String order, String loginName, String zhName, String email, String phone, String address);

    PageInfo selectAccountPage(int page, int rows, String sort, String order, String userid, String username, Integer moneyfrom,Integer moneyto, String phone, String address);

    void updateUser(SysUser user);

    SysUser selectByLoginName(String loginName);

    LoginInfo_new_child selectByLoginName_new(String userid);

    LoginInfo login(SysUser user, Serializable id, int platform);

    LoginInfo_new login_new(LoginInfo_new user, Serializable id, int platform);

    UserLevel  getUserLevelById(String userid, String userlevel);

    //判断用户ID是否存在
    boolean isExistUserId(String userid);

    //判断附表用户ID是都存在
    boolean isExistFBUserId(String userid);
    
    //用户开户
    long insertAccount(LoginInfo_new mUserinfo);
    long insertAccountChannel2(LoginInfo_new mUserinfo);
    //取得用户权限对应的使用日期
    UserLevel  getUserLevelByid(String userlevel);

    void updateAccount(LoginInfo_new userinfo);

    void deleteAccountById(String id);

    void resetAllAccountState();

    List<MechanismTrend> getMechanismTrendFive();

    PageInfo getServerState();
    List<?> getServerStateInfo();

    //取得在线用户列表
    List<LoginInfo_new> getOnlineUsers();

    //根据serverid取得服务器配置信息
    List<ServerstateDto> getServerMessage(String serverid);

    //取得人数最少的服务器配置信息
    List<ServerstateDto> getFastServerMessage();

    List<AddressInfo> findneedarea();
    List<AddressInfo> findneedareabycode(@Param("id") Integer size);
    List<AddressInfo> findallcity();
    //获取当前有效时间
    String getKaiHuTime(String userid);

    PageInfo selectAccountPageforcustomer(int page, int rows, String sort, String order, String userid, String username, String phone);
}
